<%--
  Created by IntelliJ IDEA.
  User: ？
  Date: 2021/12/14
  Time: 9:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="js/jquery-3.3.1.js"></script>
    <script>
        function sub() {

            //请求路径
            let  url = "${pageContext.request.contextPath}/show23.action"

            //请求参数
            let  params = {
                "name": "大白菜",
                "price": "25.3"

            }

            //回调函数
            let  callback = function (rel) {
                console.log("rel="+rel)

                location.href="h.jsp"


            }
            发射
            $.post(url,params,callback,"JSON");

        }


    </script>

</head>
<body>

</body>
</html>
